<template>
  <div>
    <el-dialog
      destroy-on-close
      title="审批"
      :close-on-click-modal="false"
      :visible.sync="Lvisible"
      width="1200px"
      @open="onSearch"
      @close="onClose"
    >
      <span v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.8)">
        <el-form style="width: 500px" :model="form" ref="form" :rules="rules" label-width="100px">
          <el-form-item>
            <el-radio-group v-model="checkType" @input="checkChange">
              <el-radio :label="10">同意</el-radio>
              <el-radio :label="4">不同意</el-radio>
              <el-radio :label="2">转派</el-radio>
              <el-radio :label="1">移交</el-radio>
            </el-radio-group>
          </el-form-item>
          <div>
            <el-form-item label="下一级审批">
              <el-input v-model="form.nextDis" disabled></el-input>
            </el-form-item>
            <el-form-item label="下一级审批人" prop="nextUserName">
              <el-input v-model="form.nextUserName" disabled> </el-input>
              <el-input v-model="form.nextUserName" disabled clearable>
                <el-button
                  slot="prepend"
                  type="primary"
                  icon="el-icon-plus"
                  @click="onEmployees(data.checkOrgID, data.checkPostID)"
                ></el-button>
                <el-button
                  slot="append"
                  type="danger"
                  icon="el-icon-close"
                  @click="
                    form.nextUserName = ''
                    form.nextUserID = ''
                  "
                ></el-button>
              </el-input>
            </el-form-item>
          </div>
          <div>
            <el-form-item label="下一级审批人" prop="nextUserName">
              <el-input v-model="form.nextUserName" disabled clearable>
                <el-button
                  slot="prepend"
                  type="primary"
                  icon="el-icon-plus"
                  @click="onEmployees(data.checkOrgID_Now, data.checkPostID_Now)"
                ></el-button>
                <el-button
                  slot="append"
                  type="danger"
                  icon="el-icon-close"
                  @click="
                    form.nextUserName = ''
                    form.nextUserID = ''
                  "
                ></el-button>
              </el-input>
            </el-form-item>
          </div>
          <el-form-item prop="remark" label="说明">
            <el-input
              type="textarea"
              placeholder="请输入内容"
              v-model="form.note"
              :autosize="{ minRows: 4, maxRows: 8 }"
              resize="none"
              show-word-limit
            />
          </el-form-item>
          <el-form-item>
            <el-button type="info" @click="onSubmit">提交审批</el-button>
          </el-form-item>
        </el-form>
        <el-table :data="tableData" height="300" stripe border style="width: 100%">
          <el-table-column :resizable="false" prop="describe" label="模块" min-width="100" />
          <el-table-column :resizable="false" prop="checkdis" label="审批级次" min-width="100" />
          <el-table-column :resizable="false" prop="checkusername" label="审批人" min-width="100" />
          <el-table-column :resizable="false" prop="checkdatetime" label="审批时间" min-width="100" />
          <el-table-column :resizable="false" prop="checktypestr" label="状态" min-width="100" />
          <el-table-column :resizable="false" prop="note" label="说明" min-width="100" />
        </el-table>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {},
      data: {},
      rules: {
        nextUserName: [{ required: true, message: '请选择审批人', trigger: 'blur' }]
      },
      loading: false,
      checkType: 10,
      tableData: [],
      type: '',
      checkPostID: '',
      checkOrgID: '',
      eVisible: false,
      Lvisible: true,
      infoDeptID: '',
      historyid: 1
    }
  },
  methods: {
    getTableData() {},
    onSearch() {},
    onClose() {},
    onSubmit() {},
    checkChange() {},
    onEmployees() {},
    eClose() {}
  }
}
</script>

<style></style>
